package cn.jiyun.model;

import cn.jiyun.service.EmpService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

public class Myjob implements Job {

    @Autowired
    private EmpService empService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("启动定时任务：....."+new Date());
        empService.add();
    }
}
